<div class="container">
    <div class="row">
        <div class="col-md-6 col-xs-10 col-md-offset-1">
            <form action="" method="post" novalidate>
                {% csrf_token %}
                {% for field in form %}
                    <div style="position: relative">
                        <label for="">{{ field.label }}</label>
                        {{ field }} <span class="error pull-right">{{ field.errors.0 }}</span>

                        {% if field.is_pop %}
                            <a onclick="pop('{{ field.url }}')"><span style="font-size: 23px;position: absolute; right: -23px; top: 25px;">+</span></a>
                        {% endif %}

                    </div>
                {% endfor %}

                <button type="submit" class="btn btn-success btn-lg pull-right" style="margin-top: 10px">提交</button>
            </form>

        </div>
    </div>

</div>
<script type="text/javascript">
    function pop(url) {
        window.open(url,"","width=500,height=300,top=100,left=100")
    }
</script>
